﻿namespace hedefgrup.reports.renault.sorting
{
    using hedefgrup.reports.renault.calculators;
    using System;
    using System.Collections.Generic;

    public class reportDealerSorter : IComparer<reportDealerInfo>
    {
        public int Compare(reportDealerInfo x, reportDealerInfo y)
        {
            return (x.dealer.Equals(y.dealer) ? 0 : (x.dealer.getTypeCode().Equals("root") ? 1 : ((y.dealer.getTypeCode() == "root") ? -1 : x.dealer.getSortKey().CompareTo(y.dealer.getSortKey()))));
        }
    }
}

